home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / Visual Cafe Pro v1.0 / TUTORIAL.BIN / Plane.java < prev    next >
Encoding:
Java Source  |  1996-12-10  |  2.3 KB  |  62 lines

  1. /*
  2.     A basic extension of the java.applet.Applet class
  3.  */
  4.  
  5. import java.awt.*;
  6. import java.applet.*;
  7.  
  8. public class Plane extends Applet {
  9.  
  10.     public void init() {
  11.         super.init();
  12.  
  13.         // Take out this line if you don't use symantec.itools.net.RelativeURL
  14.         symantec.itools.lang.Context.setDocumentBase(getDocumentBase());
  15.  
  16.         //{{INIT_CONTROLS
  17.         setLayout(null);
  18.         addNotify();
  19.         resize(520,80);
  20.         setFont(new Font("Dialog", Font.BOLD, 12));
  21.         setForeground(new Color(0));
  22.         setBackground(new Color(16777215));
  23.         animatorPlane = new symantec.itools.multimedia.Animator();
  24.         animatorPlane.reshape(200,8,128,71);
  25.         add(animatorPlane);
  26.         animatorPlane.setDelay(250);
  27.         animatorPlane.setNumLoops(1);
  28.         animatorPlane.setRepeatMode(true);
  29.         try {
  30.             java.net.URL[] tempURL = new java.net.URL[15];
  31.             tempURL[0] = symantec.itools.net.RelativeURL.getURL("Images/plane01.gif");
  32.             tempURL[1] = symantec.itools.net.RelativeURL.getURL("Images/plane02.gif");
  33.             tempURL[2] = symantec.itools.net.RelativeURL.getURL("Images/plane03.gif");
  34.             tempURL[3] = symantec.itools.net.RelativeURL.getURL("Images/plane04.gif");
  35.             tempURL[4] = symantec.itools.net.RelativeURL.getURL("mages/plane05.gif");
  36.             tempURL[5] = symantec.itools.net.RelativeURL.getURL("Images/plane06.gif");
  37.             tempURL[6] = symantec.itools.net.RelativeURL.getURL("Images/plane07.gif");
  38.             tempURL[7] = symantec.itools.net.RelativeURL.getURL("Images/plane08.gif");
  39.             tempURL[8] = symantec.itools.net.RelativeURL.getURL("Images/plane09.gif");
  40.             tempURL[9] = symantec.itools.net.RelativeURL.getURL("Images/plane10.gif");
  41.             tempURL[10] = symantec.itools.net.RelativeURL.getURL("Images/plane11.gif");
  42.             tempURL[11] = symantec.itools.net.RelativeURL.getURL("Images/plane12.gif");
  43.             tempURL[12] = symantec.itools.net.RelativeURL.getURL("Images/plane13.gif");
  44.             tempURL[13] = symantec.itools.net.RelativeURL.getURL("Images/plane14.gif");
  45.             tempURL[14] = symantec.itools.net.RelativeURL.getURL("Images/plane15.gif");
  46.             animatorPlane.setImageList(tempURL);
  47.         } catch (java.net.MalformedURLException error) {
  48.         }
  49.         animatorPlane.setClearFrame(false);
  50.         animatorPlane.setPreviewMode(true);
  51.         //}}
  52.     }
  53.  
  54.     public boolean handleEvent(Event event) {
  55.         return super.handleEvent(event);
  56.     }
  57.  
  58.     //{{DECLARE_CONTROLS
  59.     symantec.itools.multimedia.Animator animatorPlane;
  60.     //}}
  61. }
  62.